<html>
<head><meta charset="utf-8"><title>2020.01.07 MIR 2.0 meeting · t-compiler/wg-mir-opt · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/index.html">t-compiler/wg-mir-opt</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html">2020.01.07 MIR 2.0 meeting</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="185014270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185014270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185014270">(Jan 07 2020 at 14:21)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span class="user-mention" data-user-id="124288">@oli</span> <span class="user-mention" data-user-id="119009">@eddyb</span> we have MIR 2.0 next steps meeting in ~ 40 mins</p>



<a name="185015262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185015262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185015262">(Jan 07 2020 at 14:31)</a>:</h4>
<p>the current document is located at <a href="https://hackmd.io/aQ8y79EfS72VCUoEmzLQpg" target="_blank" title="https://hackmd.io/aQ8y79EfS72VCUoEmzLQpg">https://hackmd.io/aQ8y79EfS72VCUoEmzLQpg</a></p>



<a name="185018231"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018231" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018231">(Jan 07 2020 at 15:00)</a>:</h4>
<p>Hey everyone</p>



<a name="185018284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018284">(Jan 07 2020 at 15:01)</a>:</h4>
<p>hi Niko</p>



<a name="185018293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018293">(Jan 07 2020 at 15:01)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> <span class="user-mention" data-user-id="119009">@eddyb</span> seems like is time, hi everyone!</p>



<a name="185018301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018301">(Jan 07 2020 at 15:01)</a>:</h4>
<p>hey</p>



<a name="185018329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018329">(Jan 07 2020 at 15:01)</a>:</h4>
<p>as <span class="user-mention" data-user-id="124288">@oli</span> pointed out we have <a href="https://hackmd.io/aQ8y79EfS72VCUoEmzLQpg" target="_blank" title="https://hackmd.io/aQ8y79EfS72VCUoEmzLQpg">https://hackmd.io/aQ8y79EfS72VCUoEmzLQpg</a></p>



<a name="185018332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018332">(Jan 07 2020 at 15:01)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> is on mobile, so flaky around zulip</p>



<a name="185018354"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018354" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018354">(Jan 07 2020 at 15:02)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="185018428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018428">(Jan 07 2020 at 15:02)</a>:</h4>
<p>I think there were other documents but this should contain everything at least all the stuff I know about</p>



<a name="185018458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018458">(Jan 07 2020 at 15:02)</a>:</h4>
<p>I tried to link the other documents at the bottom</p>



<a name="185018464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018464">(Jan 07 2020 at 15:02)</a>:</h4>
<p>is there anything else related to MIR 2.0 that's not included in the document?</p>



<a name="185018468"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018468" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018468">(Jan 07 2020 at 15:02)</a>:</h4>
<p>but yea, this is the current "active" plan</p>



<a name="185018478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018478">(Jan 07 2020 at 15:02)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="185018525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018525">(Jan 07 2020 at 15:03)</a>:</h4>
<p>ok, I'm going to look it over real quick</p>



<a name="185018529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018529">(Jan 07 2020 at 15:03)</a>:</h4>
<p>so one of the last pieces that is not already merged is <a href="https://github.com/rust-lang/rust/pull/67000/" target="_blank" title="https://github.com/rust-lang/rust/pull/67000/">https://github.com/rust-lang/rust/pull/67000/</a></p>



<a name="185018548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018548">(Jan 07 2020 at 15:03)</a>:</h4>
<p>of these, I feel like removing deref + index from the list of projections is "different in kind" from the others</p>



<a name="185018561"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018561" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018561">(Jan 07 2020 at 15:04)</a>:</h4>
<p>i.e., interning and things are basically perf optimizations</p>



<a name="185018562"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018562" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018562">(Jan 07 2020 at 15:04)</a>:</h4>
<p>with that we will have promoted being constants instead of statics, we won't have statics anymore, and neither PlaceBase, so Place would be Local + projections</p>



<a name="185018618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018618">(Jan 07 2020 at 15:04)</a>:</h4>
<p>but don't have a "dramatic" effect on MIR</p>



<a name="185018674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018674">(Jan 07 2020 at 15:04)</a>:</h4>
<p>it seemed like <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> that <a href="https://github.com/rust-lang/rust/issues/67000" target="_blank" title="https://github.com/rust-lang/rust/issues/67000">#67000</a> had a few implications</p>



<a name="185018678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018678">(Jan 07 2020 at 15:04)</a>:</h4>
<p>yeah maybe we should define what's worth discussing first but my guess is removing deref, index and field?</p>



<a name="185018681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018681">(Jan 07 2020 at 15:04)</a>:</h4>
<p>I'm thinking of the question of what's a legal static etc</p>



<a name="185018700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018700">(Jan 07 2020 at 15:05)</a>:</h4>
<p>and <span class="user-mention" data-user-id="120791">@RalfJ</span>'s soundness concerns around promotion</p>



<a name="185018725"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018725" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018725">(Jan 07 2020 at 15:05)</a>:</h4>
<p>but I guess that's probably somewhat orthogonal -- i.e., we already have the behavior in question that is sort of dubious</p>



<a name="185018755"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018755" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018755">(Jan 07 2020 at 15:05)</a>:</h4>
<p>what does "Formalizing out parameters (or args passed by pointer because they are too large)" mean?</p>



<a name="185018757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018757">(Jan 07 2020 at 15:05)</a>:</h4>
<blockquote>
<p>it seemed like <span class="user-mention silent" data-user-id="116266">Santiago Pastorino</span> that <a href="https://github.com/rust-lang/rust/issues/67000" target="_blank" title="https://github.com/rust-lang/rust/issues/67000">#67000</a> had a few implications</p>
</blockquote>
<p>what do you mean? I guess you're talking about some discussion that I may have missed</p>



<a name="185018840"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018840" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018840">(Jan 07 2020 at 15:06)</a>:</h4>
<p>yeah, perhaps, there was an issue, I'm trying to find it</p>



<a name="185018876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018876">(Jan 07 2020 at 15:07)</a>:</h4>
<blockquote>
<p>what does "Formalizing out parameters (or args passed by pointer because they are too large)" mean?</p>
</blockquote>
<p>this is from the last all hands, we talked about teaching MIR about things like writing a value directly into the parent frame (and into fields of things no less)</p>



<a name="185018903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018903">(Jan 07 2020 at 15:07)</a>:</h4>
<p>I see</p>



<a name="185018908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018908">(Jan 07 2020 at 15:07)</a>:</h4>
<p>I don't remember the details, but it got pretty funky around enum variants</p>



<a name="185018931"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018931" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018931">(Jan 07 2020 at 15:08)</a>:</h4>
<p>one thing that I don't see on the list</p>



<a name="185018975"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018975" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018975">(Jan 07 2020 at 15:08)</a>:</h4>
<p>would be modifying MIR to be more easily edited</p>



<a name="185018985"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018985" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018985">(Jan 07 2020 at 15:08)</a>:</h4>
<p>e.g., convering from vectors and things identified by index</p>



<a name="185018995"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018995" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018995">(Jan 07 2020 at 15:08)</a>:</h4>
<p>basically all the NRVO stuff under <a href="https://paper.dropbox.com/doc/Topic-MIR-2.0-and-MIR-Optimizations--Ar_DezRvHY6zSzu1gCqSwicbAg-BwHR7kOhxDwL6vuAUoSTQ#:uid=104340020150096374938901&amp;h2=NRVO-Discussion" target="_blank" title="https://paper.dropbox.com/doc/Topic-MIR-2.0-and-MIR-Optimizations--Ar_DezRvHY6zSzu1gCqSwicbAg-BwHR7kOhxDwL6vuAUoSTQ#:uid=104340020150096374938901&amp;h2=NRVO-Discussion">https://paper.dropbox.com/doc/Topic-MIR-2.0-and-MIR-Optimizations--Ar_DezRvHY6zSzu1gCqSwicbAg-BwHR7kOhxDwL6vuAUoSTQ#:uid=104340020150096374938901&amp;h2=NRVO-Discussion</a></p>



<a name="185018996"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185018996" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185018996">(Jan 07 2020 at 15:08)</a>:</h4>
<p>into "linked lists" (perhaps threaded by index through a vector)</p>



<a name="185019016"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019016" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019016">(Jan 07 2020 at 15:08)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> can you add that to the list maybe?</p>



<a name="185019050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019050">(Jan 07 2020 at 15:09)</a>:</h4>
<blockquote>
<p>I don't remember the details, but it got pretty funky around enum variants</p>
</blockquote>
<p>this makes me wonder again about trying to separate out "MIR for optimization" from "MIR for analysis" more clearly</p>



<a name="185019065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019065">(Jan 07 2020 at 15:09)</a>:</h4>
<p>actually the stuff about removing projections and so forth has the same question</p>



<a name="185019067"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019067" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019067">(Jan 07 2020 at 15:09)</a>:</h4>
<p>hmm right, we talked about this at the all hands, too. I thought that it was still not clear whether we'd want that or whether we'd want transactional changes</p>



<a name="185019076"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019076" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019076">(Jan 07 2020 at 15:09)</a>:</h4>
<p>I don't really know what "transactional" means</p>



<a name="185019090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019090">(Jan 07 2020 at 15:09)</a>:</h4>
<p>it sounds like extra complexity</p>



<a name="185019095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019095">(Jan 07 2020 at 15:10)</a>:</h4>
<p>well, like with databases</p>



<a name="185019099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019099">(Jan 07 2020 at 15:10)</a>:</h4>
<p>I mean I know what it <em>means</em></p>



<a name="185019146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019146">(Jan 07 2020 at 15:10)</a>:</h4>
<p>where you can specifiy an atomic change</p>



<a name="185019168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019168">(Jan 07 2020 at 15:10)</a>:</h4>
<p>right, I guess I am proposing a simpler variant</p>



<a name="185019172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019172">(Jan 07 2020 at 15:10)</a>:</h4>
<p>where we just make MIR easier to mutate</p>



<a name="185019180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019180">(Jan 07 2020 at 15:10)</a>:</h4>
<p>right</p>



<a name="185019181"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019181" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019181">(Jan 07 2020 at 15:10)</a>:</h4>
<p>and we write the code carefully :)</p>



<a name="185019190"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019190" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019190">(Jan 07 2020 at 15:10)</a>:</h4>
<p>heheh</p>



<a name="185019217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019217">(Jan 07 2020 at 15:10)</a>:</h4>
<p>regardless it seems like a good "first step"</p>



<a name="185019222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019222">(Jan 07 2020 at 15:10)</a>:</h4>
<p>that said, I guess <code>MirPatch</code> is some kind of transactional system?</p>



<a name="185019234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019234">(Jan 07 2020 at 15:11)</a>:</h4>
<p>but it always struck me as an elaborate workaround for the fact that MIR is a PITA to edit</p>



<a name="185019250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019250">(Jan 07 2020 at 15:11)</a>:</h4>
<p>yea</p>



<a name="185019254"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019254" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019254">(Jan 07 2020 at 15:11)</a>:</h4>
<p>I'm going to edit the hackmd slightly to break things into</p>



<a name="185019260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019260">(Jan 07 2020 at 15:11)</a>:</h4>
<p>yeah I've added that to the list because I'm not sure if what was proposed is not covered by <code>MirPatch</code></p>



<a name="185019263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019263">(Jan 07 2020 at 15:11)</a>:</h4>
<ul>
<li>"space optimizations and minor tweaks"</li>
</ul>



<a name="185019364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019364">(Jan 07 2020 at 15:12)</a>:</h4>
<ul>
<li>Improving the ergonomics of MIR &lt;-- I guess this is what I am talking about</li>
</ul>



<a name="185019366"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019366" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019366">(Jan 07 2020 at 15:12)</a>:</h4>
<p>One thing that also came up is merging mir optimizations so not all of them repeat the entire visiting logic</p>



<a name="185019372"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019372" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019372">(Jan 07 2020 at 15:12)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> actually, what we did with the <code>extra_statements</code>, can't be done with <code>MirPatch</code>?</p>



<a name="185019388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019388">(Jan 07 2020 at 15:12)</a>:</h4>
<p>yea but we didn't want to mingle improvements with reverts</p>



<a name="185019405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019405">(Jan 07 2020 at 15:12)</a>:</h4>
<p>right</p>



<a name="185019408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019408">(Jan 07 2020 at 15:13)</a>:</h4>
<ul>
<li>Extending MIR to better support optimizations</li>
</ul>
<p>this covers removing deref/field/etc as well as formalizing out parameters</p>



<a name="185019453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019453">(Jan 07 2020 at 15:13)</a>:</h4>
<blockquote>
<p>One thing that also came up is merging mir optimizations so not all of them repeat the entire visiting logic</p>
</blockquote>
<p>merging how exactly?</p>



<a name="185019459"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019459" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019459">(Jan 07 2020 at 15:13)</a>:</h4>
<p>like, in some "automatic" way?</p>



<a name="185019502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019502">(Jan 07 2020 at 15:14)</a>:</h4>
<p>or writing a "meta patch"?</p>



<a name="185019514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019514">(Jan 07 2020 at 15:14)</a>:</h4>
<p>yea, meta patch that merges them similar to how lints are merged</p>



<a name="185019535"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019535" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019535">(Jan 07 2020 at 15:14)</a>:</h4>
<p>so you walk and invoke methods on the pass depending on where you are instead of each pass walking the entire mir::Body</p>



<a name="185019597"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019597" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019597">(Jan 07 2020 at 15:15)</a>:</h4>
<p>I guess this then touches on the transactional thing</p>



<a name="185019614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019614">(Jan 07 2020 at 15:15)</a>:</h4>
<p>since if you are making edits</p>



<a name="185019634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019634">(Jan 07 2020 at 15:15)</a>:</h4>
<p>it's potentially strange to be "editing" at the same time?</p>



<a name="185019636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019636">(Jan 07 2020 at 15:15)</a>:</h4>
<p>that said</p>



<a name="185019643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019643">(Jan 07 2020 at 15:15)</a>:</h4>
<p>a lot of compiler's I've seen distinguish <em>peephole</em> optimizations</p>



<a name="185019647"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019647" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019647">(Jan 07 2020 at 15:16)</a>:</h4>
<p>from other sorts</p>



<a name="185019691"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019691" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019691">(Jan 07 2020 at 15:16)</a>:</h4>
<p>and peephole optimizations are 'chained' in this way</p>



<a name="185019707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019707">(Jan 07 2020 at 15:16)</a>:</h4>
<p>since they (by definition) require only very local context and tend also to sometimes build on one another</p>



<a name="185019719"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019719" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019719">(Jan 07 2020 at 15:16)</a>:</h4>
<p>side note:</p>



<a name="185019727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019727">(Jan 07 2020 at 15:16)</a>:</h4>
<p>MIR inlining has come up a few times recently</p>



<a name="185019733"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019733" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019733">(Jan 07 2020 at 15:16)</a>:</h4>
<p>as being of particular importance</p>



<a name="185019808"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019808" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019808">(Jan 07 2020 at 15:17)</a>:</h4>
<p>yea, I think we're still not able to bootstrap with MIR inlining, but <span class="user-mention" data-user-id="125250">@Wesley Wiser</span> has been working on getting rid of a few bugs relating to that</p>



<a name="185019875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019875">(Jan 07 2020 at 15:18)</a>:</h4>
<p>I think I would propose that we focus on "less dramatic stuff" still </p>
<ul>
<li>space optimizations</li>
<li>ergonomics of manipulating MIR</li>
</ul>
<p>If we were going to do anything more ambitious, I would think that simplifying projections might be it, and I still think the scheme I roughly described for that is probably best, but I don't really remember who I was talking with about it way back when</p>



<a name="185019949"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019949" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019949">(Jan 07 2020 at 15:19)</a>:</h4>
<p>Hmm... it now says "remove <code>field</code> from projections", but why?</p>



<a name="185019969"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019969" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019969">(Jan 07 2020 at 15:19)</a>:</h4>
<p>(PS, I'm trying to edit <a href="https://hackmd.io/aQ8y79EfS72VCUoEmzLQpg?edit" target="_blank" title="https://hackmd.io/aQ8y79EfS72VCUoEmzLQpg?edit">hackmd</a> to categorize and extend things)</p>



<a name="185019972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019972">(Jan 07 2020 at 15:19)</a>:</h4>
<p>isn't <code>field</code> just an offset</p>



<a name="185019989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185019989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185019989">(Jan 07 2020 at 15:19)</a>:</h4>
<blockquote>
<p>Hmm... it now says "remove <code>field</code> from projections", but why?</p>
</blockquote>
<p>well I think that was the most extreme version, I don't know that it makes any sense</p>



<a name="185020059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020059">(Jan 07 2020 at 15:20)</a>:</h4>
<p>I think the most extreme version would just .. not have "places" really, just local variables in some sense</p>



<a name="185020064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020064">(Jan 07 2020 at 15:20)</a>:</h4>
<p>yea</p>



<a name="185020107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020107">(Jan 07 2020 at 15:20)</a>:</h4>
<p>either all the way, or keep fields + const index together</p>



<a name="185020131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020131">(Jan 07 2020 at 15:21)</a>:</h4>
<p>we may just want to collect statistics on this before we talk about the merit of either</p>



<a name="185020139"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020139" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020139">(Jan 07 2020 at 15:21)</a>:</h4>
<p>so one thought</p>



<a name="185020143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020143">(Jan 07 2020 at 15:21)</a>:</h4>
<p>the main reason to do this change</p>



<a name="185020147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020147">(Jan 07 2020 at 15:21)</a>:</h4>
<p>is to make advanced optimizations easier</p>



<a name="185020154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020154">(Jan 07 2020 at 15:21)</a>:</h4>
<p>the challenge is that it makes borrowck harder and sort of interferes w/ stacked borrows</p>



<a name="185020159"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020159" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020159">(Jan 07 2020 at 15:21)</a>:</h4>
<p>potentially anyway</p>



<a name="185020211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020211">(Jan 07 2020 at 15:22)</a>:</h4>
<p>what I was going to say is that you could do it by a "postprocessing" step</p>



<a name="185020222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020222">(Jan 07 2020 at 15:22)</a>:</h4>
<p>it doesn't solve the stacked borrows part of thing, but that's still .. somewhat WIP</p>



<a name="185020251"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020251" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020251">(Jan 07 2020 at 15:22)</a>:</h4>
<p>i.e., you can easily imagine walking down MIR as a peephole transformation and replacing deref projections etc with temporaries of the kind I described</p>



<a name="185020261"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020261" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020261">(Jan 07 2020 at 15:22)</a>:</h4>
<p>right</p>



<a name="185020267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020267">(Jan 07 2020 at 15:23)</a>:</h4>
<p>this would enable the <em>optimizations</em> at least without blocking on this other question</p>



<a name="185020293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020293">(Jan 07 2020 at 15:23)</a>:</h4>
<p>we could start out with adding such an optimization and moving it earlier and earlier until we can just remove the projection itself</p>



<a name="185020303"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020303" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020303">(Jan 07 2020 at 15:23)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> are you here?</p>



<a name="185020315"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020315" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020315">(Jan 07 2020 at 15:23)</a>:</h4>
<blockquote>
<p>we could start out with adding such an optimization and moving it earlier and earlier until we can just remove the projection itself</p>
</blockquote>
<p>maybe -- or maybe we never remove it</p>



<a name="185020413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020413">(Jan 07 2020 at 15:24)</a>:</h4>
<p>though I think a scheme where we build up "complex projections" in some way is actually reasonably nice</p>



<a name="185020430"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020430" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020430">(Jan 07 2020 at 15:24)</a>:</h4>
<p>but it is definitely moving MIR closer to optimization and further from the "ideal borrowck repr"</p>



<a name="185020450"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020450" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020450">(Jan 07 2020 at 15:24)</a>:</h4>
<p>I guess I could imagine just having a LIR for optimization</p>



<a name="185020476"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020476" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020476">(Jan 07 2020 at 15:25)</a>:</h4>
<p>but the compilation time or memory costs of that may not be worthwhile</p>



<a name="185020489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020489">(Jan 07 2020 at 15:25)</a>:</h4>
<p>doesn't borrowck already have to handle all this because you can rewrite almost all logic where there are temporaries by introducing variables?</p>



<a name="185020548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020548">(Jan 07 2020 at 15:25)</a>:</h4>
<p>no, that is very different from borrowck's perpsective</p>



<a name="185020555"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020555" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020555">(Jan 07 2020 at 15:25)</a>:</h4>
<p>I'm not sure what you mean by temporaries</p>



<a name="185020661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020661">(Jan 07 2020 at 15:26)</a>:</h4>
<p>but Places are designed to be .. almost exactly the kinds of path that borrowck understands, modulo reasoning about indices and equality</p>



<a name="185020673"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020673" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020673">(Jan 07 2020 at 15:26)</a>:</h4>
<p>(also I think we should rename Place to Path, but I guess that's neither here nor there)</p>



<a name="185020694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020694">(Jan 07 2020 at 15:26)</a>:</h4>
<p>one thing I will say about borrowck though</p>



<a name="185020720"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020720" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020720">(Jan 07 2020 at 15:26)</a>:</h4>
<p>well <code>5 + 6 + 7</code> has a temporary local for <code>tmp = 5 + 6</code> which is then added via <code>tmp + 7</code>, and you can write this in user code. I thought except for some drop rules from mir building the behaviour was also the same in mir borrowck no matter whether you have temporaries or user defined locals</p>



<a name="185020731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020731">(Jan 07 2020 at 15:27)</a>:</h4>
<p>yes, that's fine</p>



<a name="185020740"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020740" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020740">(Jan 07 2020 at 15:27)</a>:</h4>
<p>and borrowck doesn't do any special reasoning about those</p>



<a name="185020794"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020794" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020794">(Jan 07 2020 at 15:27)</a>:</h4>
<blockquote>
<p>the behaviour was also the same in mir borrowck no matter whether you have temporaries or user defined locals</p>
</blockquote>
<p>this is true -- but it can't be true for the temporaries we would be introducing for deref projections</p>



<a name="185020801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020801">(Jan 07 2020 at 15:27)</a>:</h4>
<p>let me give an example</p>



<a name="185020829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020829">(Jan 07 2020 at 15:27)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="kd">let</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">foo</span><span class="p">).</span><span class="n">bar</span><span class="p">;</span><span class="w"></span>
<span class="kd">let</span><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">foo</span><span class="p">).</span><span class="n">baz</span><span class="p">;</span><span class="w"></span>
</pre></div>



<a name="185020887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020887">(Jan 07 2020 at 15:28)</a>:</h4>
<p>this type- and borrow-checks today</p>



<a name="185020924"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020924" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020924">(Jan 07 2020 at 15:28)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="kd">let</span><span class="w"> </span><span class="n">t0</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="o">*</span><span class="n">foo</span><span class="p">;</span><span class="w"></span>
<span class="kd">let</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">t0</span><span class="p">.</span><span class="n">bar</span><span class="p">);</span><span class="w"></span>
<span class="kd">let</span><span class="w"> </span><span class="n">t1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="o">*</span><span class="n">foo</span><span class="p">;</span><span class="w"></span>
<span class="kd">let</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">t1</span><span class="p">.</span><span class="n">bar</span><span class="p">);</span><span class="w"></span>
</pre></div>



<a name="185020928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020928">(Jan 07 2020 at 15:28)</a>:</h4>
<p>this doesn't</p>



<a name="185020940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020940">(Jan 07 2020 at 15:28)</a>:</h4>
<p>hm right</p>



<a name="185020950"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020950" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020950">(Jan 07 2020 at 15:28)</a>:</h4>
<p>(not that introducing such a temporary makes all that much sense)</p>



<a name="185020963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020963">(Jan 07 2020 at 15:29)</a>:</h4>
<p>(in that <em>specific example</em>)</p>



<a name="185020998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185020998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185020998">(Jan 07 2020 at 15:29)</a>:</h4>
<p>yea but it's what the compiler would do</p>



<a name="185021007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021007">(Jan 07 2020 at 15:29)</a>:</h4>
<p>this is also the same problem for stacked borrows</p>



<a name="185021017"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021017" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021017">(Jan 07 2020 at 15:29)</a>:</h4>
<p>yeah you get the idea</p>



<a name="185021040"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021040" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021040">(Jan 07 2020 at 15:29)</a>:</h4>
<p>I mean now plausibly we could make borrowck smarter, and enable it to understand and accept that code</p>



<a name="185021046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021046">(Jan 07 2020 at 15:29)</a>:</h4>
<p>but it would be a pretty deep change</p>



<a name="185021051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021051">(Jan 07 2020 at 15:29)</a>:</h4>
<p>and it would have impact on stacked borrows etc</p>



<a name="185021114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021114">(Jan 07 2020 at 15:30)</a>:</h4>
<p>(and, if we went too far, even invalidate I think some of the logic in libstd)</p>



<a name="185021137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021137">(Jan 07 2020 at 15:30)</a>:</h4>
<p>which is why I was thinking that we would rather have some kind of "blessing" concept</p>



<a name="185021166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021166">(Jan 07 2020 at 15:30)</a>:</h4>
<p>where you desugar e.g. <code>(*foo).bar</code> into</p>



<a name="185021201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021201">(Jan 07 2020 at 15:30)</a>:</h4>
<p>(a) creating the "place value" and then (b) accessing the place value</p>



<a name="185021235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021235">(Jan 07 2020 at 15:31)</a>:</h4>
<p>and place values can get built piece by piece but are not considered a borrow, just an inert pointer, until they are either "loaded from" or "borrowed"</p>



<a name="185021243"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021243" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021243">(Jan 07 2020 at 15:31)</a>:</h4>
<p>and the borrow checker kind of tracks the path that a place value comes from</p>



<a name="185021322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021322">(Jan 07 2020 at 15:32)</a>:</h4>
<p>well... that's essentially what <span class="user-mention" data-user-id="118594">@ecstatic-morse</span> suggested with <code>Rvalue::DerefProjection</code> where you still do this in one step, but you can't use a projection as the place that you deref</p>



<a name="185021345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021345">(Jan 07 2020 at 15:32)</a>:</h4>
<p>I don't think we can accept any restrictions</p>



<a name="185021350"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021350" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021350">(Jan 07 2020 at 15:32)</a>:</h4>
<p>maybe I don't understand</p>



<a name="185021365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021365">(Jan 07 2020 at 15:32)</a>:</h4>
<p>but e.g. <code>*(*foo.bar).baz</code> etc is a valid path today</p>



<a name="185021379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021379">(Jan 07 2020 at 15:32)</a>:</h4>
<p>so we'd have primitives that are just what we need to keep the current behaviour but stop allowing a projection to have multiple derefs in one projection list</p>



<a name="185021394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021394">(Jan 07 2020 at 15:33)</a>:</h4>
<p>and borrowck gets that?</p>



<a name="185021403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021403">(Jan 07 2020 at 15:33)</a>:</h4>
<p>yes sure</p>



<a name="185021407"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021407" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021407">(Jan 07 2020 at 15:33)</a>:</h4>
<p>oic</p>



<a name="185021422"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021422" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021422">(Jan 07 2020 at 15:33)</a>:</h4>
<p>wow</p>



<a name="185021433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021433">(Jan 07 2020 at 15:33)</a>:</h4>
<p>like I said, a Place is designed to be exactly the kind of path borrowck understands, I don't really think we can simpify it</p>



<a name="185021462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021462">(Jan 07 2020 at 15:33)</a>:</h4>
<p>ok</p>



<a name="185021463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021463">(Jan 07 2020 at 15:33)</a>:</h4>
<p>( but we could build it up piece by piece )</p>



<a name="185021543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021543">(Jan 07 2020 at 15:34)</a>:</h4>
<p>and that "lowers" (for optimization purposes) into pointer manipulation</p>



<a name="185021564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021564">(Jan 07 2020 at 15:34)</a>:</h4>
<p>yea makes sense</p>



<a name="185021589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021589">(Jan 07 2020 at 15:34)</a>:</h4>
<p>but stacked borrows would still choke on it</p>



<a name="185021605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021605">(Jan 07 2020 at 15:34)</a>:</h4>
<p>meaning we couldn't have miri run optimized code anymore</p>



<a name="185021631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021631">(Jan 07 2020 at 15:35)</a>:</h4>
<p>well</p>



<a name="185021661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021661">(Jan 07 2020 at 15:35)</a>:</h4>
<p>that depends</p>



<a name="185021684"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021684" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021684">(Jan 07 2020 at 15:35)</a>:</h4>
<p>i.e., if we had some notion of "blessing" a place value</p>



<a name="185021708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021708">(Jan 07 2020 at 15:35)</a>:</h4>
<p>maybe that is retained in the MIR but optimized out to a no-op at llvm generation time</p>



<a name="185021724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021724">(Jan 07 2020 at 15:35)</a>:</h4>
<p>I guess all I mean is</p>



<a name="185021742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021742">(Jan 07 2020 at 15:35)</a>:</h4>
<p>the <code>&amp;</code> that the user wrote might be special</p>



<a name="185021791"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021791" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021791">(Jan 07 2020 at 15:36)</a>:</h4>
<p>and distinguished from the pointer manipulation that goes into constructing the path</p>



<a name="185021799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021799">(Jan 07 2020 at 15:36)</a>:</h4>
<p>and stacked borrows can likely still see that</p>



<a name="185021801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021801">(Jan 07 2020 at 15:36)</a>:</h4>
<p>right</p>



<a name="185021812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021812">(Jan 07 2020 at 15:36)</a>:</h4>
<blockquote>
<p>meaning we couldn't have miri run optimized code anymore</p>
</blockquote>
<p>but yes this is why I think it takes us some design to get this right</p>



<a name="185021819"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021819" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021819">(Jan 07 2020 at 15:36)</a>:</h4>
<p>tbh I'm finding the notation a bit hard to express, which is annoying</p>



<a name="185021850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021850">(Jan 07 2020 at 15:36)</a>:</h4>
<p>part of it is the C legacy of <code>*foo.bar</code> meaning "load value from" and <code>&amp;*foo.bar</code> meaning "take address of"</p>



<a name="185021870"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021870" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021870">(Jan 07 2020 at 15:37)</a>:</h4>
<p>it makes it confusing to keep track of when a real load occurs :)</p>



<a name="185021915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185021915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185021915">(Jan 07 2020 at 15:37)</a>:</h4>
<p>I was going to try to write out some example and kept getting tripped up :P</p>



<a name="185022010"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185022010" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185022010">(Jan 07 2020 at 15:38)</a>:</h4>
<p>yea, having an <code>Rvalue::RefProject</code> that doesn't actually have a <code>Deref</code> in it is basically this idea of having a reference and just offsetting the pointer</p>



<a name="185022107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185022107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185022107">(Jan 07 2020 at 15:39)</a>:</h4>
<p>but anyway the high-level idea would be that we have "place temporaries" that get defined by a limited set of operations and which cannot be "used" by ordinary things; you have to either "load" from them or borrow them.</p>



<a name="185022133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185022133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185022133">(Jan 07 2020 at 15:39)</a>:</h4>
<p>They'd probably be affine - i.e., consumed at most once</p>



<a name="185022152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185022152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185022152">(Jan 07 2020 at 15:39)</a>:</h4>
<p>And those "load" and "borrow" operations are where stacked borrows would kick in I guess</p>



<a name="185022251"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185022251" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185022251">(Jan 07 2020 at 15:40)</a>:</h4>
<p>well I mean we have to define how to handle them in stacked borrows, they'd be part of it, but those load/borrow operations would correspond to some of the stacked borrows changes that occur today</p>



<a name="185022268"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185022268" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185022268">(Jan 07 2020 at 15:40)</a>:</h4>
<p>I forget how much <span class="user-mention" data-user-id="120791">@RalfJ</span> and I talked about this</p>



<a name="185022484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185022484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185022484">(Jan 07 2020 at 15:43)</a>:</h4>
<p>I guess then that <code>x = &amp;*(*tmp.bar).baz</code> would be something like</p>
<div class="codehilite"><pre><span></span>P0 = LOAD(tmp.bar) // P0 is a &quot;place temporary&quot;, meaning that it is a pointer effectively
P1 = LOAD(P0.baz)
X = &amp;P1
</pre></div>


<p>and borrowck would understand that (e.g.) tmp.bar was not borrowed</p>



<a name="185022539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185022539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185022539">(Jan 07 2020 at 15:43)</a>:</h4>
<p>in some ways this might simplify borrowck, since right now I think we have to figure out which loads and other accesses occur as part of a borrow.. maybe? that maybe just falls out</p>



<a name="185022549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185022549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185022549">(Jan 07 2020 at 15:43)</a>:</h4>
<p>anyway, I think we should table these details and turn back to the higher level questions?</p>



<a name="185022582"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185022582" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185022582">(Jan 07 2020 at 15:43)</a>:</h4>
<p>(I'm open to other schemes, just want to emphasize, this is the only one I've thought of though)</p>



<a name="185022726"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185022726" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185022726">(Jan 07 2020 at 15:45)</a>:</h4>
<blockquote>
<p>anyway, I think we should table these details and turn back to the higher level questions?</p>
</blockquote>
<p>I was wondering exactly the same, maybe we should lay out a higher level plan with at least some first steps and we can organize more meetings to define some of the missing details if needed</p>



<a name="185022749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185022749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185022749">(Jan 07 2020 at 15:45)</a>:</h4>
<p>yeah so all of these concerns is what motivated me to think:</p>



<a name="185022773"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185022773" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185022773">(Jan 07 2020 at 15:45)</a>:</h4>
<p>focus on the lower-hanging fruit of optimizing MIR and making it <del>more expressive</del> easier to edit</p>



<a name="185022825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185022825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185022825">(Jan 07 2020 at 15:46)</a>:</h4>
<p>and if we needed to eliminate deref to make it tractable, do it by local rewriting <em>before</em> the optimization</p>



<a name="185022842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185022842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185022842">(Jan 07 2020 at 15:46)</a>:</h4>
<p>(that <em>will</em> mess up stacked borrows tho)</p>



<a name="185022868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185022868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185022868">(Jan 07 2020 at 15:46)</a>:</h4>
<p>(though there may be a desugaring involving <code>&amp;raw</code> that is relatively harmless?)</p>



<a name="185022887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185022887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185022887">(Jan 07 2020 at 15:46)</a>:</h4>
<p>ooh</p>



<a name="185022892"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185022892" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185022892">(Jan 07 2020 at 15:46)</a>:</h4>
<p>that's an idea</p>



<a name="185022920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185022920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185022920">(Jan 07 2020 at 15:46)</a>:</h4>
<p>I don't think that works so well for <em>borrow check</em></p>



<a name="185022941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185022941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185022941">(Jan 07 2020 at 15:47)</a>:</h4>
<p>but it might work for stacked borrows</p>



<a name="185023070"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023070" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023070">(Jan 07 2020 at 15:48)</a>:</h4>
<p>btw, just pure ignorance, how far are we from having stacked borrows in code? I haven't followed that that much</p>



<a name="185023090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023090">(Jan 07 2020 at 15:48)</a>:</h4>
<p>well, there's a prototype that works, but</p>



<a name="185023100"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023100" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023100">(Jan 07 2020 at 15:49)</a>:</h4>
<p>(a) it works on miri only of course</p>



<a name="185023111"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023111" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023111">(Jan 07 2020 at 15:49)</a>:</h4>
<p>(b) by "works" I mean that it runs the rules and detects violations</p>



<a name="185023126"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023126" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023126">(Jan 07 2020 at 15:49)</a>:</h4>
<p>(c) but the rules themselves are not fully  agreed to nor widely understood :)</p>



<a name="185023163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023163">(Jan 07 2020 at 15:49)</a>:</h4>
<p>ok</p>



<a name="185023169"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023169" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023169">(Jan 07 2020 at 15:49)</a>:</h4>
<p>(d) and in particular lots of extant code, including code in libstd, gets errors, and we haven't decided whether all of those things <em>ought</em> to be errors</p>



<a name="185023217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023217">(Jan 07 2020 at 15:50)</a>:</h4>
<p>still, I think it is pretty widely recognized as the most promising start we have towards a set of workable rules</p>



<a name="185023265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023265">(Jan 07 2020 at 15:50)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="185023309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023309">(Jan 07 2020 at 15:50)</a>:</h4>
<p>so we have 10 more minutes ...</p>



<a name="185023379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023379">(Jan 07 2020 at 15:51)</a>:</h4>
<p>should we define some next steps?</p>



<a name="185023409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023409">(Jan 07 2020 at 15:52)</a>:</h4>
<p>or I mean, what would be best to define in this last minutes?</p>



<a name="185023410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023410">(Jan 07 2020 at 15:52)</a>:</h4>
<p>seems like it to me</p>



<a name="185023482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023482">(Jan 07 2020 at 15:52)</a>:</h4>
<p>also worth noting: next all hands, presuming it happens :), will be mid March</p>



<a name="185023491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023491">(Jan 07 2020 at 15:52)</a>:</h4>
<p>so that is a time frame to keep in mind</p>



<a name="185023502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023502">(Jan 07 2020 at 15:52)</a>:</h4>
<p>yep</p>



<a name="185023503"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023503" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023503">(Jan 07 2020 at 15:52)</a>:</h4>
<p>I won't be there</p>



<a name="185023513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023513">(Jan 07 2020 at 15:52)</a>:</h4>
<p>:'(</p>



<a name="185023527"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023527" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023527">(Jan 07 2020 at 15:52)</a>:</h4>
<p>ouch :(</p>



<a name="185023538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023538">(Jan 07 2020 at 15:52)</a>:</h4>
<p>still, I feel like talking over deref/index and how to adjust borrowck would be a topic that might be well covered in person</p>



<a name="185023540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023540">(Jan 07 2020 at 15:52)</a>:</h4>
<p>Need to be back in germany on saturday</p>



<a name="185023555"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023555" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023555">(Jan 07 2020 at 15:53)</a>:</h4>
<p>you didn't figure out trains I guess?</p>



<a name="185023575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023575">(Jan 07 2020 at 15:53)</a>:</h4>
<p>(you could leave early or something? but ok)</p>



<a name="185023576"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023576" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023576">(Jan 07 2020 at 15:53)</a>:</h4>
<blockquote>
<p>Need to be back in germany on saturday</p>
</blockquote>
<p>ahh</p>



<a name="185023613"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023613" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023613">(Jan 07 2020 at 15:53)</a>:</h4>
<p>yea, I could just be there for a few days I guess</p>



<a name="185023631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023631">(Jan 07 2020 at 15:53)</a>:</h4>
<blockquote>
<p>yea, I could just be there for a few days I guess</p>
</blockquote>
<p>do it :)</p>



<a name="185023666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023666">(Jan 07 2020 at 15:54)</a>:</h4>
<blockquote>
<p>still, I feel like talking over deref/index and how to adjust borrowck would be a topic that might be well covered in person</p>
</blockquote>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="185023700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023700">(Jan 07 2020 at 15:54)</a>:</h4>
<p>I'm curious <span class="user-mention" data-user-id="124288">@oli</span> what you think about making MIR more ergonomic to edit</p>



<a name="185023713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023713">(Jan 07 2020 at 15:54)</a>:</h4>
<p>maybe we need to get more detailed about what that would mean</p>



<a name="185023731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023731">(Jan 07 2020 at 15:54)</a>:</h4>
<p>as a start, we could make basic block indices persistent :)</p>



<a name="185023733"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023733" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023733">(Jan 07 2020 at 15:54)</a>:</h4>
<p>Yea, I'm worried that the medicine is worse than the illness</p>



<a name="185023745"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023745" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023745">(Jan 07 2020 at 15:54)</a>:</h4>
<p>I don't know what that means in this context :)</p>



<a name="185023764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023764">(Jan 07 2020 at 15:55)</a>:</h4>
<p>well... the linked list stuff sounds rather easy to mess up</p>



<a name="185023786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023786">(Jan 07 2020 at 15:55)</a>:</h4>
<p>interesting. I was thinking the opposite.</p>



<a name="185023818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023818">(Jan 07 2020 at 15:55)</a>:</h4>
<p>so we'd need a good API around it... which may just make ppl run index lists on their side again</p>



<a name="185023819"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023819" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023819">(Jan 07 2020 at 15:55)</a>:</h4>
<p>I guess maybe the question is what it means to "mess up"</p>



<a name="185023824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023824">(Jan 07 2020 at 15:55)</a>:</h4>
<p>/me is following along on mobile but probably going to lose service in a minute.</p>



<a name="185023842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023842">(Jan 07 2020 at 15:55)</a>:</h4>
<p>yea, maybe I just can't imagine how it'd look</p>



<a name="185023891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023891">(Jan 07 2020 at 15:56)</a>:</h4>
<p>probably what makes the most sense is to look at what things optimizations are doing <em>now</em></p>



<a name="185023920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023920">(Jan 07 2020 at 15:56)</a>:</h4>
<p>and also to compare, I think, against the setup of cranelift</p>



<a name="185023942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023942">(Jan 07 2020 at 15:56)</a>:</h4>
<p>but jsut starting with: basic block ids are not indices into a vector but rather keys into a hashmap</p>



<a name="185023952"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023952" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023952">(Jan 07 2020 at 15:56)</a>:</h4>
<p>The inliner is kind of the biggest stress test now since it adjusts locals/places, statement indexes, etc</p>



<a name="185023970"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185023970" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185023970">(Jan 07 2020 at 15:57)</a>:</h4>
<p>yeah, it does a lot of random things, although some of them it sort of has to do</p>



<a name="185024003"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185024003" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185024003">(Jan 07 2020 at 15:57)</a>:</h4>
<p>but I agree it'd be a good candidate to examine</p>



<a name="185024014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185024014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185024014">(Jan 07 2020 at 15:57)</a>:</h4>
<p>also the drop elaboration?</p>



<a name="185024370"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185024370" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185024370">(Jan 07 2020 at 16:01)</a>:</h4>
<p>welp I have to run to another meeting; seems like no firm conclusions, but good to chat about things?</p>



<a name="185024402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185024402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185024402">(Jan 07 2020 at 16:01)</a>:</h4>
<p>yeah</p>



<a name="185024418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185024418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185024418">(Jan 07 2020 at 16:01)</a>:</h4>
<p>I guess we can conclude something async?</p>



<a name="185024591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185024591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185024591">(Jan 07 2020 at 16:03)</a>:</h4>
<blockquote>
<p>and also to compare, I think, against the setup of cranelift</p>
</blockquote>
<p>cg_clif with mir opt and my clif stack opt pass is a bit faster than cg_llvm without optimizations for the runtime of one benchmark.</p>



<a name="185025063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185025063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185025063">(Jan 07 2020 at 16:07)</a>:</h4>
<p>I'm not sure I understand what that means--</p>



<a name="185025074"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185025074" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185025074">(Jan 07 2020 at 16:07)</a>:</h4>
<p>I meant more like "it'd be good to compare how the data structures are setup"</p>



<a name="185025183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185025183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185025183">(Jan 07 2020 at 16:08)</a>:</h4>
<p>I though you meant performance.</p>



<a name="185025345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185025345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185025345">(Jan 07 2020 at 16:10)</a>:</h4>
<p>Ah ok :) good to know though!</p>



<a name="185025473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185025473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185025473">(Jan 07 2020 at 16:11)</a>:</h4>
<p>Cranelift separates the data structure containing all instructions combined with arguments (DataFlowGraph) and the data structure containing the actual place an instruction exists (Layout)</p>



<a name="185025618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185025618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185025618">(Jan 07 2020 at 16:13)</a>:</h4>
<p>When an instruction argument would cause the instruction enum to become larger, then it is often stored in a side table instead with the instruction pointing to the index.</p>



<a name="185050805"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185050805" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185050805">(Jan 07 2020 at 20:23)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I dont remember talking about how this interacts with Stacked Borrows at all^^</p>



<a name="185050863"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185050863" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185050863">(Jan 07 2020 at 20:23)</a>:</h4>
<p>but the plan sounds reasonable. it's already the case now that <code>&amp;</code> doesn't do anything, just <code>Retag(place)</code> does. so it seems all we have to do is make sure that retag insertion can distinguish user-written <code>&amp;</code> from those introduced by lowering.</p>



<a name="185403249"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185403249" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185403249">(Jan 11 2020 at 20:02)</a>:</h4>
<blockquote>
<p>e.g., convering from vectors and things identified by index</p>
</blockquote>
<p>Thanks for mentioning this. </p>
<p>Circling back around mutation: I consider something transactional a requirement. This is what enables easy estimation of value in mutation.</p>



<a name="185403280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185403280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185403280">(Jan 11 2020 at 20:03)</a>:</h4>
<p>This is <em>especially</em> relevant in context of peephole optimisations. LLVM has a some truoble with certain peephole "deoptimisations" that ought to enable further peephole optimisations. Having something transactional allows to do pretty much whatever in between beginning and figuring out whether it should be applied at all.</p>



<a name="185403347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185403347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185403347">(Jan 11 2020 at 20:05)</a>:</h4>
<p>It perhaps even allows exploring "alternatives".</p>



<a name="185403352"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185403352" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185403352">(Jan 11 2020 at 20:05)</a>:</h4>
<p>though I think another thing we should do is figure out how optimisation-oriented we want to make MIR.</p>



<a name="185403399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185403399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185403399">(Jan 11 2020 at 20:06)</a>:</h4>
<p>If all we care about is some inlining, basic const propagation and basic instruction combination, then perhaps doing too much is plain counterproductive.</p>



<a name="185403472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/2020.01.07%20MIR%202.0%20meeting/near/185403472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/2020.2E01.2E07.20MIR.202.2E0.20meeting.html#185403472">(Jan 11 2020 at 20:09)</a>:</h4>
<p>FWIW I’m still thinking if I should make time to go to all hands. This is basically the only topic I have anything to say about</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>